<template>
  <div style="height: 100%">
    <vxe-table
      border
      ref="xTable1"
      max-height="100%"
      :data="data.data" v-show="!data.columnShow">
      <vxe-table-column field="PROVINCE_NAME" title="省分" width="80" align="center" fixed="left" ></vxe-table-column>
      <vxe-table-colgroup  title="换电数据" align="center">
        <vxe-table-colgroup title="用户发展" align="center">
          <vxe-table-column field="REG_USERS_NUM" title="注册用户数（户）" width="90" align="right" header-align="center"></vxe-table-column>
          <vxe-table-column field="PAY_USERS_NUM" title="付费用户数（户）" width="90" align="right" header-align="center"></vxe-table-column>
          <vxe-table-column field="DAY_PAY_USERS" title="本日发展付费用户数（户）" width="90" align="right" header-align="center"></vxe-table-column>
          <vxe-table-column field="DAY_OFF_PAY_USERS" title="本日离网付费用户数（户）" width="90" align="right" header-align="center"></vxe-table-column>
          <vxe-table-column field="ADD_DAY_PAY_USERS" title="本日净增付费用户（户）" width="90" align="right" header-align="center"></vxe-table-column>
          <vxe-table-column field="MONTH_PAY_USERS" title="本月发展付费用户数（户）" width="90" align="right" header-align="center"></vxe-table-column>
          <vxe-table-column field="MONTH_OFF_PAY_USERS" title="本月离网付费用户数（户）" width="90" align="right" header-align="center"></vxe-table-column>
          <vxe-table-column field="ADD_MONTH_PAY_USERS" title="本月净增付费用户（户）" width="90" align="right" header-align="center"></vxe-table-column>
          <vxe-table-column field="ADD_YEAR_PAY_USERS" title="本年净增付费用户（户）" width="90" align="right" header-align="center"></vxe-table-column>
        </vxe-table-colgroup>
        <vxe-table-colgroup title="运营效率" align="center">
          <vxe-table-column field="BATT_USER_RATIO" title="电池用户比（%）" width="80" align="right" header-align="center"></vxe-table-column>
          <vxe-table-column field="ACTIVE_USERS" title="活跃人数（户）" width="80" align="right" header-align="center"></vxe-table-column>
          <vxe-table-column field="DAY_EXCHANGES" title="换电次数（次）" width="80" align="right" header-align="center"></vxe-table-column>
          <vxe-table-column field="PAY_REG_USER_RATIO" title="付费用户与注册用户比（%）" width="90" align="right" header-align="center"></vxe-table-column>
          <vxe-table-column field="DAY_ACTIVE_PAY_RATIO" title="日活跃用户与付费用户比（%）" width="90" align="right" header-align="center"></vxe-table-column>
          <vxe-table-column field="USER_EXC_AVG_TIME" title="户均换电次数（次）" width="90" align="right" header-align="center"></vxe-table-column>
          <vxe-table-column field="EXC_SUCC_RATIO" title="换电成功率（%）" width="90" align="right" header-align="center"></vxe-table-column>
          <vxe-table-column field="BATTERY_SATISFY" title="电池满足率（%）" width="90" align="right" header-align="center"></vxe-table-column>
          <vxe-table-column field="DAILY_MILEAGE" title="本日行驶里程（km）" width="150" align="right" header-align="center"></vxe-table-column>
          <vxe-table-column field="CHAR_TIMES" title="充放电次数（次）" width="90" align="right" header-align="center"></vxe-table-column>
        </vxe-table-colgroup>
        <vxe-table-colgroup title="资源资产" align="center">
          <vxe-table-column field="STATION_COUNT" title="C端换电站数量（站）" width="90" align="right" header-align="center"></vxe-table-column>
          <vxe-table-column field="CABINET_NUM" title="C端换电柜数量（个）" width="90" align="right" header-align="center"></vxe-table-column>
          <vxe-table-column field="ADD_YEAR_CABINETS" title="C端本年净增换电柜数量（个）" width="90" align="right" header-align="center"></vxe-table-column>
          <vxe-table-column field="POSITIONS_NUM" title="C端仓位数量（个）" width="90" align="right" header-align="center"></vxe-table-column>
          <vxe-table-column field="BATTERY_NUM" title="C端电池数量（个）" width="90" align="right" header-align="center"></vxe-table-column>
          <vxe-table-column field="ADD_YEAR_BATTERIES" title="C端本年净增电池数（个）" width="90" align="right" header-align="center"></vxe-table-column>
        </vxe-table-colgroup>
      </vxe-table-colgroup>
      <vxe-table-colgroup  title="租赁数据" align="center" height="100">
        <vxe-table-column field="CABINET_NUM_B" title="B端换电柜数量（个）" width="90" align="right" header-align="center"></vxe-table-column>
        <vxe-table-column field="BATTERY_NUM_B" title="B端电池数量（个）" width="90" align="right" header-align="center"></vxe-table-column>
      </vxe-table-colgroup>
      <vxe-table-column field="STAT_DATE" title="数据日期" width="120" align="right" header-align="center"></vxe-table-column>
    </vxe-table>
    <vxe-table
      border
      ref="xTable1"
      max-height="100%"
      :data="data.data" v-show="data.columnShow">
      <vxe-table-column field="PROVINCE_NAME" title="省分" width="80" align="center" fixed="left" ></vxe-table-column>
      <vxe-table-colgroup  title="换电数据" align="center">
        <vxe-table-colgroup title="用户发展" align="center">
          <vxe-table-column field="REG_USERS_NUM" title="注册用户数（户）" width="90" align="right" header-align="center"></vxe-table-column>
          <vxe-table-column field="PAY_USERS_NUM" title="付费用户数（户）" width="90" align="right" header-align="center"></vxe-table-column>
          <vxe-table-column field="DAY_PAY_USERS" title="本日发展付费用户数（户）" width="90" align="right" header-align="center"></vxe-table-column>
          <vxe-table-column field="DAY_OFF_PAY_USERS" title="本日离网付费用户数（户）" width="90" align="right" header-align="center"></vxe-table-column>
          <vxe-table-column field="ADD_DAY_PAY_USERS" title="本日净增付费用户（户）" width="90" align="right" header-align="center"></vxe-table-column>
          <vxe-table-column field="MONTH_PAY_USERS" title="本月发展付费用户数（户）" width="90" align="right" header-align="center"></vxe-table-column>
          <vxe-table-column field="MONTH_OFF_PAY_USERS" title="本月离网付费用户数（户）" width="90" align="right" header-align="center"></vxe-table-column>
          <vxe-table-column field="ADD_MONTH_PAY_USERS" title="本月净增付费用户（户）" width="90" align="right" header-align="center"></vxe-table-column>
          <vxe-table-column field="ADD_YEAR_PAY_USERS" title="本年净增付费用户（户）" width="90" align="right" header-align="center"></vxe-table-column>
        </vxe-table-colgroup>
        <vxe-table-colgroup title="运营效率" align="center">
          <vxe-table-column field="BATT_USER_RATIO" title="电池用户比（%）" width="80" align="right" header-align="center"></vxe-table-column>
          <vxe-table-column field="ACTIVE_USERS" title="活跃人数（户）" width="80" align="center" header-align="center"></vxe-table-column>
          <vxe-table-column field="DAY_EXCHANGES" title="换电次数（次）" width="80" align="right" header-align="center"></vxe-table-column>
          <vxe-table-column field="PAY_REG_USER_RATIO" title="付费用户与注册用户比（%）" width="90" align="right" header-align="center"></vxe-table-column>
          <vxe-table-column field="DAY_ACTIVE_PAY_RATIO" title="日活跃用户与付费用户比（%）" width="90" align="right" header-align="center"></vxe-table-column>
          <vxe-table-column field="USER_EXC_AVG_TIME" title="户均换电次数（次）" width="90" align="right" header-align="center"></vxe-table-column>
          <vxe-table-column field="EXC_SUCC_RATIO" title="换电成功率（%）" width="90" align="right" header-align="center"></vxe-table-column>
          <vxe-table-column field="BATTERY_SATISFY" title="电池满足率（%）" width="90" align="right" header-align="center"></vxe-table-column>
          <vxe-table-column field="DAILY_MILEAGE" title="本日行驶里程（km）" width="150" align="right" header-align="center"></vxe-table-column>
          <vxe-table-column field="CHAR_TIMES" title="充放电次数（次）" width="90" align="right" header-align="center"></vxe-table-column>
        </vxe-table-colgroup>
        <vxe-table-colgroup title="资源资产" align="center">
          <vxe-table-column field="STATION_COUNT" title="C端换电站数量（站）" width="90" align="right" header-align="center"></vxe-table-column>
          <vxe-table-column field="CABINET_NUM" title="C端换电柜数量（个）" width="90" align="center" header-align="center"></vxe-table-column>
          <vxe-table-column field="ADD_YEAR_CABINETS" title="C端本年净增换电柜数量（个）" width="90" align="right" header-align="center"></vxe-table-column>
          <vxe-table-column field="POSITIONS_NUM" title="C端仓位数量（个）" width="90" align="right" header-align="center"></vxe-table-column>
          <vxe-table-column field="BATTERY_NUM" title="C端电池数量（个）" width="90" align="right" header-align="center"></vxe-table-column>
          <vxe-table-column field="ADD_YEAR_BATTERIES" title="C端本年净增电池数（个）" width="90" align="right" header-align="center"></vxe-table-column>
        </vxe-table-colgroup>
      </vxe-table-colgroup>
      <vxe-table-colgroup  title="租赁数据" align="center" height="100">
        <vxe-table-column field="CABINET_NUM_B" title="B端换电柜数量（个）" width="90" align="right" header-align="center"></vxe-table-column>
        <vxe-table-column field="BATTERY_NUM_B" title="B端电池数量（个）" width="90" align="right" header-align="center"></vxe-table-column>
      </vxe-table-colgroup>
      <vxe-table-column field="STAT_DATE" title="数据日期" width="120" align="right" header-align="center"></vxe-table-column>
    </vxe-table>
  </div>
</template>

<script>
  import 'xe-utils'
  import 'vxe-table/lib/index.css'
	export default {
    name: 'ProvinceTable',
    props: ['data'],
	  data() {
      return {
        showDate: '',
      }
    },
    created() {
      this.handleData()
    },
    watch: {
      'data.data': function(val) {
        this.handleData()
      },
      deep: true
    },
    methods: {
      handleData(){

      }
    },
  }
</script>

<style lang="scss" scoped>

</style>
